<!DOCTYPE html>
<!-- ng-app -->
<html lang="en" ng-app="app">
<head>
    <meta charset="UTF-8">
    <title></title>
    <script src="../../../js/plugins/angular/angular.min.js" type="text/javascript"></script>
</head>
<body>
    <div ng-controller="cont">
        <span class="show">{{text}}</span>
        <input id="btnShow" type="button" ng-click="click_show()" value="显示">
        <input id="btnPara" type="button" ng-click="click_para('单击了带参数的按钮')" value="带参数显示">
    </div>

    <script>
        var app = angular.module('app',[]);
        app.controller('cont',['$scope',function ($scope) {
            $scope.text = 'hello';
            $scope.click_show = function () {
                $scope.text = '单击后显示的内容';
            }

            $scope.click_para = function (ptext) {
                $scope.text = ptext;
            }
        }])

    </script>
</body>
</html>